<?php
/*
	[UCenter Home] (C) 2007-2008 Comsenz Inc.
	$Id: site.php 10954 2009-03-02 05:26:27Z htom78 $
*/

include_once('./common.php');

//检查站点是否关闭
checkclose();

//处理rewrite
if($_SCONFIG['allowrewrite'] && isset($_GET['rewrite'])) {
	$rws = explode('-', $_GET['rewrite']);
	$_GET['ac'] = $rws[0];
	if(isset($rws[1])) {
		$rw_count = count($rws);
		for ($rw_i=1; $rw_i<$rw_count; $rw_i=$rw_i+2) {
			$_GET[$rws[$rw_i]] = empty($rws[$rw_i+1])?'':$rws[$rw_i+1];
		}
	}
	unset($_GET['rewrite']);
}


//允许的方法
$acs = array('space', 'doing', 'blog', 'album', 'ajax', 'profile', 'my_profile', 'spot', 'show', 'hot','comment', 'image', 'action');
$acfile = (empty($_GET['ac'])||!in_array($_GET['ac'], $acs))?'index':$_GET['ac'];
$op = empty($_GET['op'])?'':$_GET['op'];

include_once(S_ROOT.'./language/lang_showmessage.php');
include_once(S_ROOT.'./site/action/'.$acfile.'.php');
//echo S_ROOT.'./site/tpl/'.$acfile.'.htm';

if (file_exists(S_ROOT.'./site/tpl/'.$acfile.'.htm')) {
    include_once template("site/tpl/$acfile");
} else {
 //   echo S_ROOT.'./site/tpl/'.$acfile.'.htm'. " the file not exist\n";
}


?>
